<div class="page">
	<div class="page-head">
		<h1 class="font-thin h4">货物管理</h1>
	</div>
	<div class="client-tab">
		<span ui-sref="app.client.client_editNew">基本信息</span>
		<span ui-sref="app.client.customerrepresentative_manageNew">客户代表</span>
		<span ui-sref="app.client.goodstype_manageNew">货物分类</span>
		<span class="client-tab-cur">货物</span>
		<span ui-sref="app.client.settleManagentNew">结算方</span>
		<span ui-sref="app.client.lineprice_manageNew">线路报价</span>
		<span ui-sref="app.client.projectManagentNew">工程</span>
		<span ui-sref="app.client.clientinfo_manageNew">客户资料</span>
		<span ui-sref="app.client.returnPeriodNew">对账回款周期</span>
	</div>
	<div class="page-body">
		<form name="step4" id="goodsForm" class="form-validation" novalidate ng-controller="goodsManagentControllerNew">
		 <!--form-horizontal-->
			<div class="list-body">
				<div class="client-company">						
					<label class="control-label pull-left client-companyLabel">客户单位：</label>
					<div class="col-md-2 form-group">
						<label class="control-label pull-left client-companyDetail">{{clientName}}</label>
					</div>
				</div>
				<!--<div class="line line-xs pull-in"></div>-->

				<div class="list-query">
					<div class="query-terms" ng-if="queryTermsFilterList[0].visible">
						<label class="control-label pull-left">货物名称：</label>
						<input id="goods_name" type="text" class="form-control input-sm query-term" name="name" ng-model="queryTerms.name" placeholder="请输入货物名称">
					</div>
					
					<div class="query-terms" ng-if="queryTermsFilterList[1].visible">
						<label class="control-label pull-left">货物分类：</label>
						<select id="goods_levels" class="form-control input-sm query-term tms-select" ng-model="queryTerms.categoryId" ng-options="x.id as x.name for x in categoryTypeDropDown" name="Levels">
							<option value="">全部</option>
						</select>
					</div>

					<div class="query-terms">
						<label class="control-label pull-left"></label>
						<button id="goods_query" ng-click="queryFunc()" class="btn tms-btn tms-btn-search" ng-class="{'disabled':querying}" ng-disabled="querying">
							<i class="fa fa-search" ng-show="!querying"></i>
							<i class="fa fa-spinner no-bordr" ng-show="querying" ng-class="{'fa-spin':querying}"></i>
							<span ng-show="!querying">查询</span>
							<span ng-show="querying">查询中...</span>
						</button>
					</div>
				</div>

				<div class="list-btn-area">
					<button id="goods_add" data-toggle="modal" data-target="#goods" class="btn tms-btn tms-btn-add" ng-click="addGoods()">添加</button>
					<div class="list-filter-container">
						<tms-list-filter 
							tab-head-filter="tabHeadFilter(item)"
							query-terms-filter-list="queryTermsFilterList"
							tab-head-filter-list="tabHeadFilterList"
						></tms-list-filter>
					</div>
				</div>
			
				<div class="list-table">
					<div  ui-grid="gridOptions" ui-grid-pagination ui-grid-auto-resize ui-grid-resize-columns style=" height:{{heightA}}px;
						overflow:hidden; min-width:1650px;">
						<div class="watermark" ng-if="!gridOptions.data.length">暂无数据</div>
					</div>
				</div>
			</div>

			<!-- Modal -->
			<div class="modal fade bs-example-modal-lg" id="goods" tabindex="-1" role="dialog" aria-labelledby="myModalLabel" data-backdrop="static">
				<div class="modal-dialog modal-lg">
					<div class="modal-content">
						<div class="modal-header client-modalHeader">
							<button id="goods_dismiss" type="button" class="close" data-dismiss="modal" aria-label="Close"><span aria-hidden="true">&times;</span></button>
							<h4 class="modal-title" id="myModalLabel">{{title}}</h4>
						</div>
						<div class="modal-body">
							<table class="table-bordered client-table">
								<tr>
									<td class="client-td-left"><span class="text-danger">*</span>货物名称：</td>
									<td class="client-td-right linePrice-input">
										<input id="goods_nameBox" type="text" class="form-control input-sm ipt-3" ng-model="detail.name" required placeholder="请填写货物名称" name="nameBox">			
									</td>
								</tr>
								<tr>
									<td class="client-td-left">产品代号：</td>
									<td class="client-td-right linePrice-input">
										<input id="goods_productCode" type="text" class="form-control input-sm ipt-3" ng-model="detail.productCode" placeholder="请填写产品代号" name="productCode">		
									</td>
								</tr>
								<tr>
									<td class="client-td-left"><span class="text-danger">*</span>货物类别：</td>
									<td class="client-td-right clientInfo-select">
										<select id="goods_categoryId" class="form-control input-sm ipt-2 tms-select" ng-model="detail.categoryId" ng-options="x.id as x.name for x in categoryTypeDropDown" name="categoryIdBox" required>
											<option value="">请选择</option>
										</select>
									</td>
								</tr>
								<tr>
									<td class="client-td-left">辅助工具：</td>
									<td class="client-td-right linePrice-input">
										<input id="goods_auxiliaryTool" type="text" class="form-control input-sm ipt-3" ng-model="detail.auxiliaryTool" placeholder="请填写辅助工具" name="auxiliaryTool">		
									</td>
								</tr>
								<tr>
									<td class="client-td-left">包装方式：</td>
									<td class="client-td-right linePrice-input">
										<input id="goods_packageMethod" type="text" class="form-control input-sm ipt-3" ng-model="detail.packageMethod" placeholder="请填写包装方式" name="packageMethod">		
									</td>
								</tr>
								<tr>
									<td class="client-td-left">毛重换算率：</td>
									<td class="client-td-right linePrice-input">
										<input id="goods_gwRate" type="text" ng-pattern="/^[0-9]+(.[0-9]{1,4})?$/" class="form-control input-sm ipt-3" ng-model="detail.gwRate" placeholder="请填写毛重换算率" name="gwRate">		
									</td>
								</tr>
								<tr>
									<td class="client-td-left">货物尺寸(长)：</td>
									<td class="client-td-right linePrice-input linePrice-word">
										<input id="goods_length" type="text" ng-pattern="/^[0-9]+(.[0-9]{1,4})?$/" class="form-control input-sm ipt-3" ng-model="detail.length" name="length" placeholder="请填写货物尺寸(长)"
										name="length">
										<label>MM</label>
									</td>
								</tr>
								<tr>
									<td class="client-td-left">(宽)：</td>
									<td class="client-td-right linePrice-input linePrice-word">
										<input id="goods_width" type="text" ng-pattern="/^[0-9]+(.[0-9]{1,4})?$/" class="form-control input-sm ipt-3" ng-model="detail.width" name="width" placeholder="请填写货物尺寸(宽)"
										name="width">
										<label>MM</label>
									</td>
								</tr>
								<tr>
									<td class="client-td-left">(高)：</td>
									<td class="client-td-right linePrice-input linePrice-word">
										<input id="goods_height" type="text" ng-pattern="/^[0-9]+(.[0-9]{1,4})?$/" class="form-control input-sm ipt-3" ng-model="detail.height" name="height" placeholder="请填写货物尺寸(高)"
										name="height">
										<label>MM</label>
									</td>
								</tr>
								<tr>
									<td class="client-td-left">货物容量：</td>
									<td class="client-td-right linePrice-input linePrice-word">
										<input id="goods_volume" type="text" class="form-control input-sm ipt-3" ng-model="detail.volume" placeholder="请填写货物容量" name="volume">
										<label>L</label>
									</td>
								</tr>
								<tr>
									<td class="client-td-left">货物重量：</td>
									<td class="client-td-right project-selectMa linePrice-input">
										<input id="goods_weight" type="text" ng-pattern="/^[0-9]+(.[0-9]{1,4})?$/" class="form-control input-sm ipt-3" ng-model="detail.weight" placeholder="请填写货物重量" name="weight">
										<select class="form-control input-sm ipt-2 tms-select" id="goods_weightUnit" ng-model="detail.weightUnit" name="weightUnit" ng-options="x.value as x.text for x in weightUnitDropDown">
											<option value="">请选择</option>
										</select>			                                   
									</td>
								</tr>
								<tr>
									<td class="client-td-left">货物规格：</td>
									<td class="client-td-right linePrice-input">
										<input id="goods_goodNorms" type="text" class="form-control input-sm ipt-3" ng-model="detail.goodNorms" placeholder="请填写货物规格" name="goodNorms">
									</td>
								</tr>
								<tr>
									<td class="client-td-left">赔偿方式：</td>
									<td class="client-td-right linePrice-input">
										<input id="goods_compensation" type="text" class="form-control input-sm ipt-3" ng-model="detail.compensation" placeholder="请填写赔偿方式" name="compensation">
									</td>
								</tr>
								<tr>
									<td class="client-td-left">备注：</td>
									<td class="client-td-right">
										<textarea class="form-control project-textarea" ng-model="detail.remarks" placeholder="请再次填写备注" name="remarks"></textarea>
									</td>
								</tr>
							</table>
							<div class="clientIfo-bottom tms-editBtn">
								<button id="goods_save" type="button" class="btn tms-btn tms-btn-save" ng-click="detail.click()">保存</button>
								<button  id="goods_miss" type="button" class="btn tms-btn tms-btn-miss" data-dismiss="modal">取消</button>
							</div> 
						</div>

					</div>
				</div>
			</div>
			
		</form>
	</div>
	
</div>